- target = defined?(embed_link) ? '__blank' : ''
- @project = card if defined?(card)
- ref = defined?(ref) ? ref : nil

div[itemtype="http://schema.org/CreativeWork" class="#{defined?(wrapper_class) ? wrapper_class : ''}"] 
  .card-project.card.u-radius
    meta[itemprop="dateCreated" content=@project.created_at.to_date]
    a.card-project-thumb style="background-image: url(#{@project.display_image(:project_thumb_large)});display:block;" href="#{project_by_slug_path(@project.permalink, ref: ref)}" target=target
    .card-project-description
      .fontweight-semibold.fontsize-base.u-marginbottom-10.u-text-center-small-only.lineheight-tight=link_to truncate(@project.name, length: 50, separator: ''), project_by_slug_path(@project.permalink, ref: ref), title: @project.name, target: target, class: 'link-hidden', itemprop: "name"
      .w-hidden-small.w-hidden-tiny.fontcolor-secondary.fontsize-smaller
        = link_to project_by_slug_path(@project.permalink, ref: ref), title: @project.headline, target: target, class: 'link-hidden' do
          = truncate(@project.headline, length: 140)
    .w-clearfix.card-project-author.w-hidden-small.w-hidden-tiny[itemprop="author" itemscope itemtype="http://schema.org/Person"]
      .w-hidden-small.w-hidden-tiny.thumb.small.u-round.u-left
        .u-left
          = image_tag(@project.user.display_image, class: 'u-round thumb small')
      p.card-author-name.fontsize-smaller[itemprop="name" content="#{@project.user.display_name}"]
          = @project.user.display_name
    .card-project-meter class=@project.state
      -if ['successful', 'failed', 'waiting_funds'].include? @project.state
        div= t("projects.card.display_status.#{@project.display_status}")
      -else
        .meter
          = @project.progress_bar
    .card-project-stats
      .w-row
        .w-col.w-col-4.w-col-small-4.w-col-tiny-4
          .fontsize-base.fontweight-semibold 
            = "#{@project.progress}%"
        .w-col.w-col-4.w-col-small-4.w-col-tiny-4.u-text-center-small-only
          .fontsize-smaller.fontweight-semibold 
            = @project.display_pledged
          .fontsize-smallest.lineheight-tightest Levantados
        .w-col.w-col-4.w-col-small-4.w-col-tiny-4.u-text-right
          - unless @project.expired?
            .fontsize-smaller.fontweight-semibold 
              = "#{@project.time_to_go[:time]}  #{@project.time_to_go[:unit]}"
            .fontsize-smallest.lineheight-tightest 
              = t('.remaining', count: @project.time_to_go[:time])
          - else
            .fontsize-smallest.lineheight-tight.fontweight-semibold.w-row 
              = t("projects.card.display_status.#{@project.display_card_status}").capitalize
            = @project.display_expires_at 
